<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org" >
<head>
    <meta charset="UTF-8">
    <title th:text="${inputType} + ' to ' +${outputType}"></title>
    <link rel='stylesheet' type="text/css" th:href="@{/css/bootstrap.min.css}">
    <link rel='stylesheet' type="text/css" th:href="@{/css/bootstrap-select.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/editor.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/header.css}">
    <link rel="stylesheet" type="text/css" th:href="@{/css/button.css}">
</head>
<body>
<!-- 使用 th:replace 指令引入通用模板 -->
<div th:replace="header :: header"></div>
<!-- Editor -->
<div class="container">
    <div class="row">
        <div class="col-md-12 col-sm-12 codeSide input">
            <div class="row">
                <div class="col-md-12 col-sm-12">
                    <div class="compile-code">
                        <!-- Language Selection -->
                        <!-- Editor -->
                        <pre name="code" class="editor" id="editor-input" style="border: none;"></pre>
                        <!-- <input type="submit" id="compile" class="btn btn-sky text-uppercase btn-sm" value="Compile"> -->
                    </div>
                </div>
            </div>
        </div>
        <div class="button-box">

            <button class="btn third" onclick="convert()" th:text="${inputType} + ' to ' +${outputType}" ></button>
            <button class="btn third" onclick="uploadFile()">上传文件</button>
            <button class="btn third" onclick="downloadFile()" id="download-btn">下载文件</button>
            <button class="btn third" id="submit-btn">保存文件</button>
            <input id="convertType"  th:value="${inputType} + 'to' +${outputType}" type="hidden">

        </div>
        <div class="col-md-12 col-sm-12 codeSide output">
            <div class="row">
                <div class="col-md-12 col-sm-12">
                    <div class="compile-code">
                        <!-- Language Selection -->
                        <!-- Editor -->
                        <pre name="code" class="editor" id="editor-output" style="border: none;"></pre>
                        <!-- <input type="submit" id="compile" class="btn btn-sky text-uppercase btn-sm" value="Compile"> -->
                    </div>
                </div>
            </div>
        </div>
        <!-- /.col-md-12 col-sm-12 codeSide -->
    </div>
    <!-- /.row -->
</div>

<script th:src="@{/js/jquery-3.6.0.min.js}"></script>
<!--<script src='//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js'></script>-->
<!--编辑器js-->
<script th:src="@{https://ajaxorg.github.io/ace-builds/src-min-noconflict/ace.js}"></script>
<!--<script th:src="@{/js/ace.js}"></script>-->

<!--头部js-->
<script th:src="@{/js/bootstrap.min.js}"></script>

<script th:src="@{/js/readfile.js}"></script>
<script th:src="@{/js/convert.js}"></script>
<script th:src="@{/js/downloadfile.js}"></script>
<script th:src="@{/js/header.js}"></script>
<script th:src="@{/js/editor.js}"></script>


</body>
</html>